---
permalink: "/behaviors/advanced/dispatch/source-screen.xml"
hv_title: "Dispatch Event Source"
hv_button_behavior: "back"
---
{% extends 'templates/scrollview.xml.njk' %}
{% from 'macros/button/index.xml.njk' import button %}
{% from 'macros/description/index.xml.njk' import description %}

{% block content %}
  {{ description('Pressing the button below will emit the event `test-event` and navigate you back to the previous screen, with new content added.') }}
  {% call button('Dispatch event & go back') -%}
    <behavior
      action="dispatch-event"
      event-name="test-event"
      trigger="press"
    />
    <behavior
      trigger="press"
      action="back"
      href="#"
    />
  {%- endcall %}
{% endblock %}
